<?php

namespace app\admin\command;

use addons\shopro\service\commission\Agent as AgentService;
use addons\shopro\service\commission\Reward as RewardService;
use app\admin\model\shopro\commission\Agent;
use app\admin\model\shopro\user\WalletLog;
use app\admin\model\User;
use app\common\model\MoneyLog;
use app\common\model\ScoreLog;
use app\common\model\TokensLog;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\Db;

class RunLucky extends Command
{
    protected function configure()
    {
        $this->setName("run-lucky");
    }

    protected function execute(Input $input, Output $output)
    {
        $userLucky= \app\admin\model\shopro\lucky\User::where(['lucky_id'=> 350,'stutas'=>'0'])->select();
        if($userLucky){
            foreach ($userLucky as $item){
                \think\Queue::push('\addons\shopro\job\Commission@orderCommission', $item, 'shopro-high');
            }
        }
    }
}
